package com.rtx.wms.customer.k3.api;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.kingdee.bos.webapi.entity.IdentifyInfo;
import com.kingdee.bos.webapi.sdk.K3CloudApi;

@Component
public class K3Api {
	
	@Value("${k3.UserName}")
	private String UserName;
	@Value("${k3.AppID}")
	private String AppId;
	@Value("${k3.AppSec}")
	private String AppSecret;
	@Value("${k3.AcctID}")
	private String CID;
	@Value("${k3.ServerUrl}")
	private String ServerUrl;

	public K3CloudApi getK3API() {
		  IdentifyInfo  iden = new IdentifyInfo();
	        iden.setUserName("工业2");
	        iden.setAppId(AppId);
	        iden.setdCID(CID);
	        iden.setAppSecret(AppSecret);
	        iden.setlCID(2052);
	        iden.setServerUrl(ServerUrl);
	        K3CloudApi api = new K3CloudApi(iden);
	        return api;
	}
}
